<?php

namespace JsonLowCode\UI;

use JsonLowCode\Schema;

/**
 * Template 组件
 * @method static Template make(string $slotName = "", array $params = [])
 */
class Template extends Schema
{
    protected string $componentName = "Template";

    /**
     * @param string $slotName
     * @param array $params
     */
    public function __construct(string $slotName = "", array $params = [])
    {
        parent::__construct();
        $slot = [
            "name"=>$slotName,
        ];
        if ($params){
            $slot['params'] = $params;
        }
        $this->prop("slot",$slot);
    }
}
